package com.ruoyi.leave.service.impl;

import com.ruoyi.leave.instener.DynamicJumpCmd;
import org.activiti.engine.ManagementService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class DynamicJumpService {
    @Resource
    protected ManagementService managementService;

    public void execution(String processInstanceId, String fromActivitiId, String toActivitiId) {
        DynamicJumpCmd dynamicJumpCmd = new DynamicJumpCmd(processInstanceId, fromActivitiId, toActivitiId);
        managementService.executeCommand(dynamicJumpCmd);
    }
}
